"
I am a debug point target that installs a metalink on an AST node of a method
"
Class {
	#name : 'DebugPointNodeTarget',
	#superclass : 'DebugPointClassTarget',
	#category : 'DebugPoints-Implementations',
	#package : 'DebugPoints',
	#tag : 'Implementations'
}

{ #category : 'accessing - classes' }
DebugPointNodeTarget class >> hitAnnouncementClass [

	^ DebugPointHit
]

{ #category : 'private' }
DebugPointNodeTarget >> install: aLink on: aClassOrObject [

	aClassOrObject link: aLink toAST: self node
]

{ #category : 'accessing' }
DebugPointNodeTarget >> method [
	"returns the method to which the debug point is attached"

	^ self methodNode compiledMethod
]

{ #category : 'accessing' }
DebugPointNodeTarget >> methodNode [

	^ self node methodNode
]

{ #category : 'accessing' }
DebugPointNodeTarget >> node [

	^ self target
]

{ #category : 'accessing' }
DebugPointNodeTarget >> node: aNode [

	self target: aNode
]

{ #category : 'removing' }
DebugPointNodeTarget >> removeFromMethod: aMethod for: aDebugPoint [

	aDebugPoint removeWithoutUninstall
]

{ #category : 'accessing' }
DebugPointNodeTarget >> sourceCode [

	^ self methodNode sourceCode
]

{ #category : 'accessing' }
DebugPointNodeTarget >> targetClass [

	^ self method methodClass
]

{ #category : 'description' }
DebugPointNodeTarget >> targetString [

	^ [self method printString] on: Error do:['ERROR PARSING DEBUG POINT TARGET']
]
